package com.fhyc.config;

import com.fhyc.intercepter.LoginInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class AppConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 将自定义的拦截器添加到拦截器注册表中
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**");
    }
}